Dr. Schaller Information Technology Research Institute
Munich, Germany (DSITRI)


1. What is Mac06?

"Mac06" is a lightweight environment resembling the UNIXª programming and user interface running on top of MacOSª 7.5.x. It is therefore virtually hardware independent within the Macintosh computer series, as the already existing device drivers are used. There are, of course, different versions for MC680x0 and PPC60x processors. The file system completely relies on the MacOS HFS and, therefore, transferring data between Mac06 and MacOS is very simple. Programs can be compiled using Symantec C++/THINK C. In this environment, even the MacToolbox (dialogs, windows etc) can be used within Mac06 executables. It is possible to start any Mac application from within the Mac06 system.

2. Where can I download the files?

Either from the info-mac archives or directly from
http://ourworld.compuserve.com/homepages/Nikolaus_Schaller/mac06.html
Please note the COPYRIGHT and LICENCE conditions.

3. Which hardware is supported?

Regarding processors, all Macintosh, Macintosh Performa and PowerPC platforms are supported in principle as well as MacOS 8.0 - but they have not been tested yet. In fact, the system relies completely on the documented MacOS programming interface. Only devices mapped into the Mac06 system calls are available. These are in the current release:
  1. monitor screen (any LCD or CRT, any resolution and color depth)
  2. mouse
  3. keyboard
  4. HFS disks (IDE, SCSI, internal, external, hard and soft, floppies and CD-ROMs)
There is no serial line support and no printer support yet. BSD socket calls for TCP/IP including UDP and DNS are (not yet much tested and reliable) supported through MacTCP and the PPP-version you have installed. The system has been compiled and tested on a Performa 5200 with MacOS 7.5.5 using Symantec C++ for Power PC version 8.0.3, and a PowerBook 165 with MacOS 7.5.5 and Think C 7.0.

4. What is the latest release?

The latest release is mac06-0.93.
The initial releases with a major version number 0 (i.e. mac06-0.6, mac06-0.7, etc.) are freeware (-: Donations are welcome, of course :-). It is intended to change this to shareware for later versions (i.e. mac06-1.0, mac06-1.1, etc.) to support further development. The shareware fee will be announced in the COPYRIGHT and LICENCE notices of these versions.

5. When is the next release coming and what is on the roadmap?

I can't announce the next release yet, but there are already too much ideas to include: Tell me what you would like to have next.

6. Where can I find the source code?

Sorry, but the policy is not to make the source code of the kernel, the libraries and the applications public. All code has been completely rewritten by using publically avaliable descriptions and is not based on freeware/shareware source code from e.g. GNU, Linux software.

7. What does "Mac06" stand for?

Mac06 (pronounced "mac-oh-six") is an allusion to "POSIX" (the portable operating system standard IEEE Std. 1003.1-1988/90) and to the Macintosh operating system "MacOS". The idea to rename the system from the initial working title "minux" (mini-unix) hit the author while walking to attend the "Systems 97" fair in Munich - the time the vision of an Mac-POSIX operating system began to grow from "mini" to "full sized".

8. How are file names converted?

The file name "." and all names beginning with ".." under MacOS are prefixed by two additional dots in Mac06. Therefore Additionally, slash characters ("/") are replaced by ":" and blanks (" ") by underscores ("?"). Therefore, the MacOS file "..Test x/y" is listed under Mac06 as "....Test?x:y". These rules are applied vice versa for creating new files and directories. All this is done to keep the directory structure transparent. Note that the virtual files (to be correct: directories) "." and ".." are available under Mac06 only and have no direct MacOS equivalent. And, finally, please note that upper and lower case characters are distinguished!

9. How do I write appliction software for Mac06?

At the current stage, there is only one solution: use Think C or Symantec C++ for Power PowerPC. A sample project (68k and PPC versions) can be found in /home/demo/src.

10. How are the file creator and file type attributes handled?

For reading files, the file type 'APPL' makes ll display a 'x' (for executable). For text files, the file type 'TEXT' makes read (and write) calls to convert '\n' to '\r' and vice versa. If new files are created, a kernel-builtin table (later on defined by /etc/mactags) is consulted to define the creator and type. With this table, the kernel tries to identify the file name extension (.c, .h, .doc, .zip, .gif, .sit etc.) and set the creator and type. If this fails, the file is created initially with creator '????' and type 'TEXT', and after the first write to the file, the first bytes are scanned for a magic pattern. Then, the creator and type attributes are modified accordingly. If this still fails, you should drag the file onto 'Binary Pump' which has its own (configurable) tags table. By the way, only the u+w attribute (chmod u+w, u-w) is changeable.

11. How to Quit?

Either: If the kernel is killed and application processes keep hanging around in the MacOS process list, kill them by hand (tricky on the Finder - but AppWatcher from www.mauisoftware.com may be useful).

12. Where does /usr/bin/sh.1 come from?

This is a tribute to the way MacOS launches applications. Although MacOS 7.x is a multi-tasking system, there is the restriction, that each application can be run only once. The reason lies in the way, application configurations are stored in the ressource fork of the file. Therefore, several images of the same application code in memory could mangle up the resource fork and therefore MacOS does not permit to launch the same application file more than once.
If you are running a server system, you may be aware of an exeption. It is possible to set the multiLaunch flag through ResEdit. Then, the same application can be run on an AppleShare network on different machines - but still not on the same.
Mac06 therefore tries firstly to launch the original. If this fails because the process is already running, the kernel makes a copy of the application file (named sh.1, sh.2 etc.) and launches this. Therfore, two ressource forks exist, the files have different names and MacOS will launch the application for a second time. This copy will never be deleted automatically, but it will be reused. By calling shell scripts and some applications which fork() and exec() others, you will certainly run across this feature.

13. Why is Mac06 a full kernel and not simply a POSIX library doing all this file name conversion stuff?

Well, most of the POSIX system calls could be implemented in a library module that transforms all the Mac Toolbox calls to POSIX conventions. Even processes could be managed - but the fork() command has a very special side effect: all file descriptors in both processes share the current file access pointers. This can not be implemented in a library with variables local to each process. Therfore, a separate kernel process holding this information is required. Additionally, this concept is much more flexible and allows for much better multitasking. Nevertheless, the multitasking model is not preemptive as in UNIX but cooperative.

14. What are the terminal control characters?

/dev/console and /dev/tty1 etc. emulate a VT52 with 24x80 screen. If you resize the window, neither the number of lines and columns is updated, nor the LINES and COLUMNS environment variables.

15. Which Books can you recommend?


Contact

Dr. H. Nikolaus Schaller 
Back to Home Page 
©HNS, last modification: 23 Jul 1998